<template>
  <div class="bottom-bar">
    <div class="bar-item bar-left">
      <div>
        <i class="service"></i>
        <span>客服</span>
      </div>

      <div>
        <i class="shop"></i>
        <span>店铺</span>
      </div>

      <div>
        <i class="select"></i>
        <span>收藏</span>
      </div>
    </div>

    <div class="bar-item bar-right">
      <div class="cart" @click="addToCart">加入购物车</div>
      <div class="buy">购买</div>
    </div>
  </div>
</template>

<script>
  export default {
    name: "",
    methods: {
      addToCart(){
        this.$emit('addToCart')
      }
    }
  }
</script>

<style lang="less" scoped>
.bottom-bar{
  height: 49px;
  background-color: #fff;
  position: relative;
  /*bottom: 49px;*/
  left: 0;
  right: 0;

  display: flex;
}
.bottom-bar > div{
  width: 50%;
  display: flex;
}
.bar-left > div{
  width: 33.3333%;
  text-align: center;
}
.bar-left > div > i{
  display: block;
  height: 22px;
  width: 22px;
  background: url("~assets/img/detail/detail_bottom.png") 0 0;
  -webkit-background-size: 100%;
  background-size: 100%;
  margin: 4px auto 3px;
}
.bar-left .service{
  background-position:0 -54px;
}
.bar-left .shop{
  background-position:0 -98px;
}
.bar-right > div{
  width: 50%;
  text-align: center;
  line-height: 55px;
}
.bar-right{
  font-size: 15px;
}
.bar-right .cart{
  background-color: #ffe817;
  color: #333;
}
.bar-right .buy{
  background-color: #f69;
  font-weight: bold;
  color: #fff;
}
</style>
